package com.jkc.xh.fragments;


import android.view.View;
import android.widget.TextView;

import com.jkc.xh.R;
import com.jkc.xh.fragments.core.BaseFragment;
import com.jkc.xh.models.MoneyBillModel;
import com.jkc.xh.utils.Tool;
import com.jkc.xh.views.widget.NavBar;

import org.androidannotations.annotations.AfterViews;
import org.androidannotations.annotations.EFragment;
import org.androidannotations.annotations.FragmentArg;
import org.androidannotations.annotations.ViewById;

/**
 * 平仓结算
 */
@EFragment(R.layout.fragment_money_bill_detail)
public class BillMoneyDetailFragment extends BaseFragment {

    @ViewById(R.id.nav_bar)
    NavBar nav_bar;
    @FragmentArg("modelExtra")
    MoneyBillModel modelExtra;

    @ViewById
    TextView id;
    @ViewById
    TextView create_time;
    @ViewById
    TextView pre_money;
    @ViewById
    TextView pay_money;
    @ViewById
    TextView bal_money;
    @ViewById
    TextView bean_money;
    @ViewById
    TextView fee_money;
    @ViewById
    TextView remark;
    @ViewById
    TextView stock_code;
    @ViewById
    TextView stock_name;


    @AfterViews
    void initData() {
        nav_bar.setOnMenuClickListener(new NavBar.OnMenuClickListener() {
            @Override
            public void onLeftMenuClick(View view) {
                finishFragment();
            }

        });
        create_time.setText(Tool.formatSecondSimpleFullDate(modelExtra.create_time));
        stock_code.setText(modelExtra.stock_code);
        stock_name.setText(modelExtra.stock_name);
        id.setText(modelExtra.id);
        pre_money.setText(modelExtra.pre_money);
        pay_money.setText(modelExtra.pay_money);
        bal_money.setText(modelExtra.bal_money);
        bean_money.setText(modelExtra.bean_money);
        fee_money.setText(modelExtra.fee_money);
        remark.setText(modelExtra.remark);
    }


}
